package exception;

import util.Util;

public class FormatException extends Exception {

	private String input;
	private boolean isValid;
	
	public FormatException(String input) {
		this.input = input;
		this.isValid = true;
	}
	
	@Override
	public String getMessage() {
			
		if(!input.contains("-") || !Util.hasNumber(input)) {
			isValid = false;
		}

		return "형식에 어긋난 문자가 입력되었습니다";
	}
}
